package com.ehome.poct.base.device.repository;

import com.ehome.core.repository.BaseRepository;
import com.ehome.poct.base.api.dto.device.SoftwareUpgradeQry;
import com.ehome.poct.base.api.dto.device.TestDeviceVersionDTO;
import com.ehome.poct.base.api.dto.device.VersionStatusQry;

import java.util.List;

public interface TestDeviceVersionRepository extends BaseRepository<TestDeviceVersionDTO> {

    Boolean getVersionCode(Integer packageType, String deviceType, Integer versionCode);
    
    Boolean getSoftVersionCode(Integer packageType, String deviceType,String packageId, Integer versionCode);

    String getVersion(Integer packageType, Integer deviceType);

    String minVersion(Integer packageType, Integer deviceType,String packageId);

    String maxVersion(Integer packageType, Integer deviceType,String packageId);

    List<TestDeviceVersionDTO> newVersion(TestDeviceVersionDTO dto);
    
    Integer getCode(String version);

    void updateStatus(VersionStatusQry qry);

    List<TestDeviceVersionDTO> getSoftwareUpgradeInfo(SoftwareUpgradeQry qry);

    boolean selectVersion(String name,String deviceType,Integer packageType);
    
    boolean selVersion(String name,String packageId,String deviceType,Integer packageType);
}
